#include "Stone.h"
 
#include "Resource.h"

Stone::Stone(LPDIRECT3DDEVICE9 d3ddv, LPDIRECT3DSURFACE9 BackBuffer, LPD3DXSPRITE SpriteHandler, float x, float y, int ID, int Object_State) : Object(x, y)
{
	this->setIDObjType(ID);
	p_sprite = new Sprite(SpriteHandler, ResourceMng::GetInst(d3ddv, BackBuffer)->GetTexture(L"..\\Resources\\Images\\stone.png"), 0, 0);
	
	//object_State = 1;
	width = p_sprite->getTexture()->getWidth();
	height = p_sprite->getTexture()->getHeight();

	veloc_x = 0;
	veloc_y = 0;
	this->obj_state = Object_State;
}

Stone::~Stone()
{
	if (p_sprite != NULL)
	{
		delete p_sprite;
	}
}

 

void Stone::render(int cameraX, int cameraY)
{
	Object::render(cameraX, cameraY);
}

OBJECT_TYPE Stone::getObjectType()
{
	return OBJECT_LAND;
}

void Stone::update(list<Object*>* obj_list, DxInput* input, float gameTime)
{
	Object::update(obj_list, input, gameTime);
}